package com.gitee.kamismile.stone.basic.data.infrastructure.repository.r2Repository.sysUser.repository;

import com.gitee.kamismile.stone.basic.data.domain.sysUser.repository.entity.SysRoleUser;
import com.gitee.kamismile.stone.basic.data.domain.sysUser.repository.entity.SysUserResources;
import org.springframework.data.r2dbc.repository.Modifying;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import reactor.core.publisher.Mono;

public interface SysUserRoleRepository extends R2dbcRepository<SysRoleUser,Integer> {

    @Modifying
    @Query("delete from sys_role_user WHERE n_tenant_id = :nTenantId AND n_user_id = :nUserId")
    Mono<Void> deleteUserRoleByUserId(Integer nUserId, Integer nTenantId);
}
